package com.taihe.interceptor;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by zwt on 2018/7/23.
 */

/**
 * 创建自定义的拦截器实现HandlerInterceptor接口
 * 创建一个java类集成WebMvcConfigurerAdapter 重写addInterceptors方法
 * 实例化自定义的拦截器 将对象手动添加到拦截器链中
 */
/*public class ShareInterceptor implements HandlerInterceptor {

    *//*@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("拦截器来了");
        return true;
    }*//*


}*/
